package com.zzs.restweb.util;

import java.util.Properties;

/**
 * @Description TODO
 * @Author 张智顺
 * @Date 2020/9/17-21:12
 */
public class PropertiesSingleton {

    /**
     * 使用volatile关键字
     */
    private volatile static Properties properties;

    private PropertiesSingleton() {
    }

    public static Properties getInstance() {
        if (null == properties) {
            synchronized (Properties.class) {
                if (null == properties) {
                    properties = new Properties();
                }
            }
        }
        return properties;
    }

}
